// pages/Map/Map.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    longitude: 0,
    latitude: 0,
    scale: 18
  },
  /************************************菜单***************************************** */
  hx_caidan: function () {
    wx.navigateTo({
      url: '../index/index',
    })
  },
  /************************************定位***************************************** */
  hx_dingwei: function () {
this.movetoCenter();
    this.setData({
      scale: 19,
    //   latitude: 23.6326856388,
    //  longitude: 113.6784446239,
      markers: [{
        iconPath: '/images/1 (1).png',   //教学楼1
        latitude: 23.6316978152,
        longitude: 113.6768513918,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (2).png',   //教学楼2
        latitude: 23.6312948204,
        longitude: 113.6771571636,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (3).png',   //教学楼3
        latitude: 23.6309311410,
        longitude: 113.6773824692,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (4).png',   //教学楼4
        latitude: 23.6305478022,
        longitude: 113.6775648594,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (5).png',   //教学楼5
        latitude: 23.6341206728,
        longitude: 113.6781764030,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (6).png',   //教学楼6
        latitude: 23.6338356331,
        longitude: 113.6785036325,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (7).png',   //教学楼7
        latitude: 23.6335555072,
        longitude: 113.6788362265,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (8).png',   //教学楼8
        latitude: 23.6343025082,
        longitude: 113.6798340082,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (9).png',   //教学楼9
        latitude: 23.6338798634,
        longitude: 113.6799842119,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (10).png',   //教学楼10
        latitude: 23.6334621318,
        longitude: 113.6800485849,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (11).png',   //教学楼11
        latitude: 23.6330837149,
        longitude: 113.6800432205,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/3 (1).png',   //实验楼1
        latitude: 23.6313488807,
        longitude: 113.6782246828,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/3 (2).png',   //实验楼2
        latitude: 23.6309409702,
        longitude: 113.6784070730,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/3 (3).png',   //实验楼3
        latitude: 23.6305576315,
        longitude: 113.6785733700,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/3 (4).png',   //实验楼4
        latitude: 23.6326610662,
        longitude: 113.6799895763,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/4 (1).png',   //行政楼A1
        latitude: 23.6335849942,
        longitude: 113.6768299341,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/4 (2).png',   //行政楼A2
        latitude: 23.6344646855,
        longitude: 113.6778813601,
        width: 40,
        height: 41.5
        }, {
          iconPath: '/images/2 (1).png',   //1
          latitude: 23.6305330584,
          longitude: 113.6754995584,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (2).png', //2
          latitude: 23.6299482188,
          longitude: 113.6757624149,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (3).png', //3
          latitude: 23.6296238529,
          longitude: 113.6759340763,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (4).png', //4
          latitude: 23.6292994861,
          longitude: 113.6761057377,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (5).png', //5
          latitude: 23.6289603746,
          longitude: 113.6762076616,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (6).png', //6
          latitude: 23.6308181054,
          longitude: 113.6763310432,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (7).png', //7
          latitude: 23.6303659617,
          longitude: 113.6765348911,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (8).png', //8
          latitude: 23.6299039871,
          longitude: 113.6767601967,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (9).png', //9
          latitude: 23.6294469256,
          longitude: 113.6769640446,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (10).png', //10
          latitude: 23.6289898626,
          longitude: 113.6771786213,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (11).png', //11
          latitude: 23.6285622860,
          longitude: 113.6773288250,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (12).png', //12
          latitude: 23.6353050554,
          longitude: 113.6799359322,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (13).png', //13
          latitude: 23.6350691626,
          longitude: 113.6804831028,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (14).png', //14
          latitude: 23.6347841250,
          longitude: 113.6808907986,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (15).png', //15
          latitude: 23.6358898711,
          longitude: 113.6805689335,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (16).png', //16
          latitude: 23.6356588938,
          longitude: 113.6811375618,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (17).png', //17
          latitude: 23.6353296276,
          longitude: 113.6815023422,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (18).png', //18
          latitude: 23.6349413872,
          longitude: 113.6818242073,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (19).png', //19
          latitude: 23.6334080723,
          longitude: 113.6825644970,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (20).png', //20
          latitude: 23.6331132020,
          longitude: 113.6826181412,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (21).png', //21
          latitude: 23.6328085020,
          longitude: 113.6827307940,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (22).png', //22
          latitude: 23.6324841431,
          longitude: 113.6828541756,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (23).png', //23
          latitude: 23.6321745271,
          longitude: 113.6830151081,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (24).png', //24
          latitude: 23.6323367070,
          longitude: 113.6838734150,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (25).png', //25
          latitude: 23.6318599957,
          longitude: 113.6833691597,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (26).png', //26
          latitude: 23.6365975437,
          longitude: 113.6815291643,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (27).png', //27
          latitude: 23.6361896496,
          longitude: 113.6819314957,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (28).png', //28
          latitude: 23.6358652991,
          longitude: 113.6822319031,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (29).png', //29
          latitude: 23.6346809215,
          longitude: 113.6829024553,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (30).png', //30
          latitude: 23.6343614818,
          longitude: 113.6830365658,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (31).png', //31
          latitude: 23.6340764425,
          longitude: 113.6832350492,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (32).png', //32
          latitude: 23.6337864882,
          longitude: 113.6834496260,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (33).png', //33
          latitude: 23.6334867043,
          longitude: 113.6837393045,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (34).png', //34
          latitude: 23.6331476035,
          longitude: 113.6840450764,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (35).png', //34
          latitude: 23.6327986729,
          longitude: 113.6843347549,
          width: 40,
          height: 41.5
        },{
          iconPath: '/images/5.png',   //1
          latitude: 23.6316486696,
          longitude: 113.6758214235,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/5.png', //2
          latitude: 23.6341059294,
          longitude: 113.6822533607,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/5.png', //3
          latitude: 23.6346760071,
          longitude: 113.6792117357,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/7.png',   //1
          latitude: 23.6311670413,
          longitude: 113.6763042212,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/7.png', //2
          latitude: 23.6346465203,
          longitude: 113.6798608303,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/7.png', //3
          latitude: 23.6337176854,
          longitude: 113.6823123693,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (9).png',   //东操
          latitude: 23.6321008089,
          longitude: 113.6749094725,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (9).png',   //西操
          latitude: 23.6321302961,
          longitude: 113.6812502146,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (7).png',   //篮球
          latitude: 23.6334424738,
          longitude: 113.6757624149,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (3).png', //排球
          latitude: 23.6340764425,
          longitude: 113.6759716272,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (5).png', //羽毛球
          latitude: 23.6295845357,
          longitude: 113.6776882410,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (4).png', //网球
          latitude: 23.6293781206,
          longitude: 113.6778867245,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (7).png', //篮球
          latitude: 23.6318943976,
          longitude: 113.6818993092,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (6).png', //足球
          latitude: 23.6328281600,
          longitude: 113.6818671227,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (4).png', //网球
          latitude: 23.6324988867,
          longitude: 113.6760199070,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (8).png', //游泳
          latitude: 23.6323072197,
          longitude: 113.6757516861,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (10).png',   //体育馆
          latitude: 23.6330984584,
          longitude: 113.6758804321,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (10).png', //体育馆
          latitude: 23.6332950387,
          longitude: 113.6812931299,
          width: 40,
          height: 41.5
        },{
            iconPath: '/images/8.png',
          latitude: 23.6358751279,
          longitude: 113.6793619394,
            width: 40,
            height: 41.5
          }, {
                iconPath: '/images/9.png',
                latitude: 23.6349708739,
                longitude: 113.6772269011,
                width: 40,
                height: 41.5
              },{
        iconPath: '/images/10.png',
          latitude: 23.6323612797,
          longitude: 113.6790025234,
        width: 40,
        height: 41.5
        }, {
          iconPath: '/images/11 (1).png',   //1
          latitude: 23.6301349746,
          longitude: 113.6784124374,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (2).png', //2
          latitude: 23.6298007798,
          longitude: 113.6784124374,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (3).png', //3
          latitude: 23.6294076085,
          longitude: 113.6784124374,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (4).png', //3
          latitude: 23.6359144431,
          longitude: 113.6798715591,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (5).png', //3
          latitude: 23.6362043927,
          longitude: 113.6802202463,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (6).png', //3
          latitude: 23.6364795986,
          longitude: 113.6806011200,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (7).png',   //1
          latitude: 23.6369218924,
          longitude: 113.6811590195,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (8).png', //2
          latitude: 23.6352853977,
          longitude: 113.6825913191,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (9).png', //3
          latitude: 23.6309950307,
          longitude: 113.6812287569,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (10).png', //3
          latitude: 23.6307099842,
          longitude: 113.6813682318,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (11).png', //3
          latitude: 23.6311572121,
          longitude: 113.6820387840,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (12).png', //3
          latitude: 23.6314373431,
          longitude: 113.6827147007,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/12.png',   //1
          latitude: 23.6288817399,
          longitude: 113.6778813601,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/13.png',   //1
          latitude: 23.6314225994,
          longitude: 113.6800003052,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/14.png',   //1
          latitude: 23.6353394564,
          longitude: 113.6791634560,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/15.png',   //1
          latitude: 23.6303610470,
          longitude: 113.6802846193,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/16.png',   //1
          latitude: 23.6355704343,
          longitude: 113.6783587933,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/17.png',   //1
          latitude: 23.6344106264,
          longitude: 113.6768996716,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/18.png',   //1
          latitude: 23.6308770805,
          longitude: 113.6753493547,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/19.png',   //1
          latitude: 23.6327347841,
          longitude: 113.6757570505,
          width: 40,
          height: 41.5
        }, 
      
      
      ]
      
     
      })
  },
  
  /************************************教学楼************************************ */
  hx_jiaoshi: function () {
    this.setData({
      latitude: 23.6326856388, 
      longitude: 113.6784446239,
      scale: 19,
      markers: [{
        iconPath: '/images/1 (1).png',   //教学楼1
        latitude: 23.6316978152,
        longitude: 113.6768513918,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (2).png',   //教学楼2
        latitude: 23.6312948204,
        longitude: 113.6771571636,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (3).png',   //教学楼3
        latitude: 23.6309311410,
        longitude: 113.6773824692,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (4).png',   //教学楼4
        latitude: 23.6305478022,
        longitude: 113.6775648594,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (5).png',   //教学楼5
        latitude: 23.6341206728,
        longitude: 113.6781764030,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (6).png',   //教学楼6
        latitude: 23.6338356331,
        longitude: 113.6785036325,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (7).png',   //教学楼7
        latitude: 23.6335555072,
        longitude: 113.6788362265,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (8).png',   //教学楼8
        latitude: 23.6343025082,
        longitude: 113.6798340082,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (9).png',   //教学楼9
        latitude: 23.6338798634,
        longitude: 113.6799842119,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (10).png',   //教学楼10
        latitude: 23.6334621318,
        longitude: 113.6800485849,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/1 (11).png',   //教学楼11
        latitude: 23.6330837149,
        longitude: 113.6800432205,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/3 (1).png',   //实验楼1
        latitude: 23.6313488807,
        longitude: 113.6782246828,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/3 (2).png',   //实验楼2
        latitude: 23.6309409702,
        longitude: 113.6784070730,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/3 (3).png',   //实验楼3
        latitude: 23.6305576315,
        longitude: 113.6785733700,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/3 (4).png',   //实验楼4
        latitude: 23.6326610662,
        longitude: 113.6799895763,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/4 (1).png',   //行政楼A1
        latitude: 23.6335849942,
        longitude: 113.6768299341,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/4 (2).png',   //行政楼A2
        latitude: 23.6344646855,
        longitude: 113.6778813601,
        width: 40,
        height: 41.5
      },
      ]
    })
  },
  /************************************宿舍楼***************************************** */
  hx_shushe: function () {

    var maps = [38.332010, 114.771600]
    this.setData({
      latitude: 23.6323760233,
      longitude: 113.6790776253,
      scale: 18,
      markers: [{
        iconPath: '/images/2 (1).png',   //1
        latitude: 23.6305330584,
        longitude: 113.6754995584,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (2).png', //2
        latitude: 23.6299482188,
        longitude: 113.6757624149,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (3).png', //3
        latitude: 23.6296238529,
        longitude: 113.6759340763,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (4).png', //4
        latitude: 23.6292994861,
        longitude: 113.6761057377,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (5).png', //5
        latitude: 23.6289603746,
        longitude: 113.6762076616,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (6).png', //6
        latitude: 23.6308181054,
        longitude: 113.6763310432,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (7).png', //7
        latitude: 23.6303659617,
        longitude: 113.6765348911,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (8).png', //8
        latitude: 23.6299039871,
        longitude: 113.6767601967,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (9).png', //9
        latitude: 23.6294469256,
        longitude: 113.6769640446,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (10).png', //10
        latitude: 23.6289898626,
        longitude: 113.6771786213,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (11).png', //11
          latitude: 23.6285622860, 
          longitude: 113.6773288250,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (12).png', //12
          latitude: 23.6353050554,
          longitude: 113.6799359322,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (13).png', //13
        latitude: 23.6350691626,
        longitude: 113.6804831028,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (14).png', //14
        latitude: 23.6347841250,
        longitude: 113.6808907986,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (15).png', //15
        latitude: 23.6358898711,
        longitude: 113.6805689335,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (16).png', //16
        latitude: 23.6356588938,
        longitude: 113.6811375618,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (17).png', //17
        latitude: 23.6353296276,
        longitude: 113.6815023422,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (18).png', //18
        latitude: 23.6349413872,
        longitude: 113.6818242073,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (19).png', //19
        latitude: 23.6334080723,
        longitude: 113.6825644970,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (20).png', //20
        latitude: 23.6331132020,
        longitude: 113.6826181412,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (21).png', //21
        latitude: 23.6328085020,
        longitude: 113.6827307940,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (22).png', //22
        latitude: 23.6324841431,
        longitude: 113.6828541756,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (23).png', //23
        latitude: 23.6321745271,
        longitude: 113.6830151081,
        width: 40,
        height: 41.5
        }, {
          iconPath: '/images/2 (24).png', //24
          latitude: 23.6323367070,
          longitude: 113.6838734150,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/2 (25).png', //25
          latitude: 23.6318599957,
          longitude: 113.6833691597,
          width: 40,
          height: 41.5
        },{
        iconPath: '/images/2 (26).png', //26
        latitude: 23.6365975437,
        longitude: 113.6815291643,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (27).png', //27
        latitude: 23.6361896496,
        longitude: 113.6819314957,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (28).png', //28
        latitude: 23.6358652991,
        longitude: 113.6822319031,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (29).png', //29
        latitude: 23.6346809215,
        longitude: 113.6829024553,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (30).png', //30
        latitude: 23.6343614818,
        longitude: 113.6830365658,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (31).png', //31
        latitude: 23.6340764425,
        longitude: 113.6832350492,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (32).png', //32
        latitude: 23.6337864882,
        longitude: 113.6834496260,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (33).png', //33
        latitude: 23.6334867043,
        longitude: 113.6837393045,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/2 (34).png', //34
        latitude: 23.6331476035,
        longitude: 113.6840450764,
        width: 40,
        height: 41.5
        }, {
          iconPath: '/images/2 (35).png', //34
          latitude: 23.6327986729, 
          longitude: 113.6843347549,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (1).png',   //1
          latitude: 23.6301349746,
          longitude: 113.6784124374,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (2).png', //2
          latitude: 23.6298007798,
          longitude: 113.6784124374,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (3).png', //3
          latitude: 23.6294076085,
          longitude: 113.6784124374,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (4).png', //3
          latitude: 23.6359144431,
          longitude: 113.6798715591,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (5).png', //3
          latitude: 23.6362043927,
          longitude: 113.6802202463,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (6).png', //3
          latitude: 23.6364795986,
          longitude: 113.6806011200,
          width: 40,
          height: 41.5
        },{
          iconPath: '/images/11 (7).png',   //1
          latitude: 23.6369218924,
          longitude: 113.6811590195,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (8).png', //2
          latitude: 23.6352853977,
          longitude: 113.6825913191,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (9).png', //3
          latitude: 23.6309950307,
          longitude: 113.6812287569,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (10).png', //3
          latitude: 23.6307099842,
          longitude: 113.6813682318,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (11).png', //3
          latitude: 23.6311572121,
          longitude: 113.6820387840,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/11 (12).png', //3
          latitude: 23.6314373431,
          longitude: 113.6827147007,
          width: 40,
          height: 41.5
        }, 
      ]
    })
  },
  /****************************************餐饮***************************************** */
  hx_fantang: function () {
    this.setData({
      latitude: 23.6323760233,
      longitude: 113.6790776253,
      scale: 18,
      markers: [{
        iconPath: '/images/5.png',   //1
        latitude: 23.6316486696,
        longitude: 113.6758214235,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/5.png', //2
        latitude: 23.6341059294,
        longitude: 113.6822533607,
        width: 40,
        height: 41.5
      }, {
        iconPath: '/images/5.png', //3
        latitude: 23.6346760071,
        longitude: 113.6792117357,
        width: 40,
        height: 41.5
        }, {
          iconPath: '/images/7.png',   //1
          latitude: 23.6311670413, 
          longitude: 113.6763042212,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/7.png', //2
          latitude: 23.6346465203, 
          longitude: 113.6798608303,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/7.png', //3
          latitude: 23.6337176854, 
          longitude: 113.6823123693,
          width: 40,
          height: 41.5
        }, 
      ]
    })
  },
  /****************************************操场***************************************** */
  hx_chaochang: function () {
    this.setData({
      latitude: 23.6323760233,
      longitude: 113.6790776253,
      scale: 18,
      markers: [{
        iconPath: '/images/6 (9).png',   //东操
        latitude: 23.6321008089,
        longitude: 113.6749094725,
        width: 40,
        height: 41.5
      }, {
          iconPath: '/images/6 (9).png',   //西操
          latitude: 23.6321302961, 
          longitude: 113.6812502146,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (7).png',   //篮球
          latitude: 23.6334424738,
          longitude: 113.6757624149,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (3).png', //排球
          latitude: 23.6340764425,
          longitude: 113.6759716272,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (5).png', //羽毛球
          latitude: 23.6295845357,
          longitude: 113.6776882410,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (4).png', //网球
          latitude: 23.6293781206,
          longitude: 113.6778867245,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (7).png', //篮球
          latitude: 23.6318943976,
          longitude: 113.6818993092,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (6).png', //足球
          latitude: 23.6328281600,
          longitude: 113.6818671227,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (4).png', //网球
          latitude: 23.6324988867, 
          longitude:113.6760199070,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (8).png', //游泳
          latitude: 23.6323661942,
          longitude: 113.6757516861,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (10).png',   //体育馆
          latitude: 23.6330984584,
          longitude: 113.6758804321,
          width: 40,
          height: 41.5
        }, {
          iconPath: '/images/6 (10).png', //体育馆
          latitude: 23.6332950387,
          longitude: 113.6812931299,
          width: 40,
          height: 41.5
        }, 

      ]
    })
  },
 

  /****************************************医 务 室************************************ */
  hx_hospital: function () {
    var maps = [38.330691, 114.770442]
    this.setData({
      latitude: 23.6323760233,
      longitude: 113.6790776253,
      scale: 18,
      markers: [{
        iconPath: '/images/8.png',
        latitude: 23.6358751279,
        longitude: 113.6793619394,
        width: 40,
        height: 41.5
      }]
    })
  },
  /****************************************车站************************************** */
  hx_chezhan: function () {
    this.setData({
      latitude: 23.6323760233,
      longitude: 113.6790776253,
      scale: 18,
      markers: [{
        iconPath: '/images/9.png',
        latitude: 23.6349708739, 
        longitude: 113.6772269011,
        width: 40,
        height: 41.5
      }]
    })
  },
  /****************************************图书馆*********************************** */
  hx_library: function () {
    this.setData({
      latitude: 23.6323612797,
      longitude: 113.6790025234,
      scale: 18,
      markers: [{
        iconPath: '/images/10.png',
        latitude: 23.6323612797,
        longitude: 113.6790025234,
        width: 40,
        height: 41.5
      },]
    })
  },


  
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
     this.timer = options.timer;
    wx.getLocation({
      success: (res)=> {
        this.setData({
          longitude : res.longitude,
          latitude : res.latitude,
         

        })
      },
    })
    
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },
  movetoCenter: function () {
    this.mapctx.moveToLocation();
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    this.mapctx = wx.createMapContext("map");
    this.movetoCenter();
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
   onShareAppMessage: function (event) {
    return {
      title: '南苑派',
     
        }
      }
})
